﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class aboutus : System.Web.UI.Page
{
    News n = new News();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            this.Label1.Text = n.GetContentByCid(295);
            BindJYJJ();
            BindGSZZ();
            BindDWJS();
        }
    }

    public void BindJYJJ()
    {
        DataTable dt = new DataTable();
        SqlHelper.FillDataTable("select top 4 * from news where classid=297 order by id",dt);
        this.DataList1.DataSource = dt;
        this.DataList1.DataBind();
    }

    public void BindGSZZ()
    {
        DataTable dt = new DataTable();
        SqlHelper.FillDataTable("select * from news where classid=294 order by id", dt);
        this.DataList2.DataSource = dt;
        this.DataList2.DataBind();
    }

    public void BindDWJS()
    {
        DataTable dt = new DataTable();
        SqlHelper.FillDataTable("select top 4 * from news where classid=296 order by id desc", dt);
        this.DataList3.DataSource = dt;
        this.DataList3.DataBind();
    }
}
